using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class sc_logMap : EntityTypeConfiguration<sc_log>
    {
        public sc_logMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.errormessage)
                .HasMaxLength(150);

            // Table & Column Mappings
            this.ToTable("sc_log");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.error).HasColumnName("error");
            this.Property(t => t.errormessage).HasColumnName("errormessage");
        }
    }
}
